<?php

class Backend_PolicyController extends Zend_Controller_Action {

//put your code here
    public function init() {
        $this->_helper->layout->setLayout('backend');
        Service_Account::checkLogin(2);
    }
    
    public function indexAction() {
        if ($this->_request->isPost()) {
            $desc = $this->_request->getPost('policy');
            $desc = stripslashes($desc);
            $result = Service_Model::factory('Policy', 'update', $desc, 'backend');
        }

        $desc = Service_Model::factory('Policy', 'get', NULL, 'backend');
        $this->view->policy = $desc['policy'];
    }
}

